package cn.wolfcode.luowowo.article.query;

import cn.wolfcode.luowowo.article.query.condition.TravelCondition;
import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class TravelQuery extends QueryObject{

    private Integer travelTimeType=-1;
    private Integer perExpendType=-1;
    private Integer dayType=-1;
    private Integer orderType=1;
    private Long destId=-1l;

    public TravelCondition getTravelTimeRange() {
        return TravelCondition.travelTimeRange.get(this.travelTimeType);
    }
    public TravelCondition getPerExpendRange() {
        return TravelCondition.perExpendRange.get(this.perExpendType);
    }
    public TravelCondition getDayTimeRange() {
        return TravelCondition.dayRange.get(this.dayType);
    }
    public String getOrderBy() {
        return this.orderType==1?"createTime desc":"viewnum desc";
    }
}
